<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Laoyang BBS</title>

    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="apple-touch-icon" href="apple-touch-icon.png">

    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="css/fontAwesome.css">
    <link rel="stylesheet" href="css/light-box.css">
    <link rel="stylesheet" href="css/templatemo-style.css">

    <link href="https://fonts.googleapis.com/css?family=Kanit:100,200,300,400,500,600,700,800,900" rel="stylesheet">

    <script src="js/vendor/modernizr-2.8.3-respond-1.4.2.min.js"></script>


</head>

<body>

<nav>
    <div class="logo">
        <a href="/">返回<em>大厅</em></a>
    </div>
    <div class="menu-icon">
        <span></span>
    </div>
</nav>

<div class="page-heading">
    <div class="container">
        <div class="heading-content">
            <h1>文章<em>详细</em></h1>
        </div>
    </div>
</div>


<div class="blog-entries">
    <div class="container">
        <div class="col-md-2"></div>
        <div class="col-md-8">

            <div class="blog-posts">
                <div class="row">
                    <div class="col-md-12">

                        <div class="blog-post">
                            <img src="img/portfolio_item_4.png" alt="">
                            <div class="text-content">
                                <input type="hidden" th:value="${article.id}" id="id" name="id" />
                                <h2><a href="#" th:text="${article.title}" name="title"></a></h2>
                                <div class="simple-btn">
                                    <a href="#" th:text="${article.author}" name="author"></a>
                                </div>
                                <br>
                                <span>发布时间<a href="#" th:text="${article.date}"></a></span>
                                <br>
                                <textarea  id="deblock_udid" th:border="0" readonly="readonly"
                                           name="content" rows="20" style="min-width: 90%" placeholder="内容" th:text="${article.content}"> </textarea>
                                <br>


                                <div align="center">

                                    <!--发布文章！！！！！！！！！！！-->
                                    <button type='button' class='btn btn-default' data-target='#myModal' data-toggle='modal'>发布文章</button>

                                    <!--Modal部分,默认不显示，内部样式自己随意定义-->
                                    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                        <div class="modal-dialog" style="width: 700px;margin-top: 150px;">
                                            <div class="modal-content" style="height: 400px;width: 700px;padding-left: 10px;padding-right: 10px">
                                                <!--头部-->
                                                <div class="modal-header">
                                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                                    <h4 class="modal-title" id="myModalLabel">发布文章</h4>
                                                </div>
                                                <!--体部-->
                                                <div class="modal-body" style="height: 200px">
                                                    <input class="form-control" placeholder="请输入标题" id="addArticleTitle" style="margin-bottom: 15px;"/>
                                                    <textarea class='form-control' placeholder="请输入内容" id="addArticleContent" style='height:180px;'></textarea>
                                                </div>
                                                <!--尾部-->
                                                <div class="modal-footer" style="margin-top: 75px;">
                                                    <button type="button" id="addArticleButton" class="btn btn-primary btn-blue">确认</button>
                                                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>


                                    <!--编辑文章！！！！！！！！！！！-->
                                    <button type='button' class='btn btn-default' data-target='#myModal2' data-toggle='modal'>编辑文章</button>

                                    <!--Modal部分,默认不显示，内部样式自己随意定义-->
                                    <div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                        <div class="modal-dialog" style="width: 700px;margin-top: 150px;">
                                            <div class="modal-content" style="height: 400px;width: 700px;padding-left: 10px;padding-right: 10px">
                                                <!--头部-->
                                                <div class="modal-header">
                                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                                    <h4 class="modal-title" id="myModalLabel2">编辑文章</h4>
                                                </div>
                                                <!--体部-->
                                                <div class="modal-body" style="height: 200px">
                                                    <input id="editArticleId" th:type="1" th:value="${article.getUserid()}">
                                                    <input class="form-control" th:value="${article.title}" id="editArticleTitle" style="margin-bottom: 15px;"/>
                                                    <textarea class='form-control' th:text="${article.content}" id="editArticleContent" style='height:180px;'></textarea>
                                                </div>
                                                <!--尾部-->
                                                <div class="modal-footer" style="margin-top: 75px;">
                                                    <button type="button" id="editArticleButton" class="btn btn-primary btn-blue">确认</button>
                                                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>


                                    <!--删除文章！！！！！！！！！！！-->
                                    <button type='button' class='btn btn-default' data-target='#myModal3' data-toggle='modal'>删除文章</button>

                                    <!--Modal部分,默认不显示，内部样式自己随意定义-->
                                    <div class="modal fade" id="myModal3" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                        <div class="modal-dialog" style="width: 700px;margin-top: 150px;">
                                            <div class="modal-content" style="height: 400px;width: 700px;padding-left: 10px;padding-right: 10px">
                                                <!--头部-->
                                                <div class="modal-header">
                                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                                    <h4 class="modal-title" id="myModalLabel3">删除文章</h4>
                                                </div>
                                                <!--体部-->
                                                <div class="modal-body" style="height: 200px">
                                                    <input id="deleteArticleId" th:type="1" th:value="${article.getUserid()}">
                                                    是否删除此文章？
                                                </div>
                                                <!--尾部-->
                                                <div class="modal-footer" style="margin-top: 75px;">
                                                    <button type="button" id="deleteArticleButton" class="btn btn-primary btn-blue">确认</button>
                                                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                <!--<input type="button" value="编辑">-->
                                <!--<input type="submit"  value="保存"  onclick="form1.action='editInfo';form1.submit()">-->
                                <!--<input type="submit"  align="left" value="删除" onclick="form1.action='deleteInfo';form1.submit()" >-->
                                </div>


                                <hr>
                                <br>
                                <textarea  id="reply_content" th:border="0"
                                           name="content" rows="5" style="min-width: 90%" placeholder="说出你的想法"></textarea>
                                <br>
                                <div align="center">
                                <input type="button" id="replyButton" value="评论">
                                </div>
                                <br><br>
                                <div class="blog-post" th:if="${reply0}">
                                    <div class="text-content">
                                        <div class="simple-btn">
                                            <input type="hidden" th:value="${reply0.id}" name="reply_id">
                                            <a href="#" th:text="${reply0.replyer}"></a>
                                        </div>
                                        <br>
                                        <span><a href="#" th:text="${reply0.date}"></a> </span>
                                        <br>
                                        <textarea th:border="0" readonly="readonly"
                                                   name="content" rows="5" style="min-width: 90%" placeholder="内容" th:text="${reply0.reply}"> </textarea>
                                    </div>
                                </div>
                                <div class="blog-post" th:if="${reply1}">
                                    <div class="text-content">
                                        <div class="simple-btn">
                                            <input type="hidden" th:value="${reply1.id}" name="reply_id">
                                            <a href="#" th:text="${reply1.replyer}"></a>
                                        </div>
                                        <br>
                                        <span><a href="#" th:text="${reply1.date}"></a> </span>
                                        <br>
                                        <textarea th:border="0" readonly="readonly"
                                                  name="content" rows="5" style="min-width: 90%" placeholder="内容" th:text="${reply1.reply}"> </textarea>
                                    </div>
                                </div>
                                <div class="blog-post" th:if="${reply2}">
                                    <div class="text-content">
                                        <div class="simple-btn">
                                            <input type="hidden" th:value="${reply2.id}" name="reply_id">
                                            <a href="#" th:text="${reply2.replyer}"></a>
                                        </div>
                                        <br>
                                        <span><a href="#" th:text="${reply2.date}"></a> </span>
                                        <br>
                                        <textarea th:border="0" readonly="readonly"
                                                  name="content" rows="5" style="min-width: 90%" placeholder="内容" th:text="${reply2.reply}"> </textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <ul class="page-number">
                        <li class="active"><a href="#" th:href="@{replypage(replypage=1,articleid=${article.id})}"><<</a></li>
                        <li><a href="#" th:href="@{replypage(replypage=${replypage}-1,articleid=${article.id})}"><</a></li>
                        <li><a href="#" th:href="@{replypage(replypage=${replypage}+1,articleid=${article.id})}">></a></li>
                        <li><a th:text="${replypage}"></a></li>
                    </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-2">

        </div>
    </div>
</div>



<!-- Modal button -->
<div class="popup-icon">
    <button id="modBtn" class="modal-btn"><img src="img/contact-icon.png" alt=""></button>
</div>

<!-- Modal -->
<div id="modal" class="modal">
    <!-- Modal Content -->
    <div class="modal-content">
        <!-- Modal Header -->
        <div class="modal-header">
            <div id="unlogin">
                <h3 class="header-title">欢迎使用老杨的系统</h3>
                <br><br>
                <h4><a href="/tologin">点我登陆</a></h4>
                <br><br>
                <h4>没有账号？</h4>
                <br><br>
                <h4><a href="/toregister">点我注册</a></h4>
            </div>
            <div class="close-btn"><img src="img/close_contact.png" alt=""></div>
        </div>

    </div>
</div>

<section class="overlay-menu">
    <div class="container">
        <div class="row">
            <div class="main-menu">
                <ul>
                    <li>
                        <a href="/">系统首页</a>
                    </li>

                    <li>
                        <a href="/toarticle">所有文章</a>
                    </li>
                    <li>
                        <a href="/tomyarticle">我的文章</a>
                    </li>
                    <li>
                        <a href="/topermission">权限管理</a>
                    </li>
                    <li>
                        <a href="/tologin">登陆</a>
                    </li>
                    <li>
                        <a href="/toregister">注册</a>
                    </li>
                    <li>
                        <a href="/tologout">登出</a>
                    </li>
                </ul>
                <p>may you happy to use laoyang's bbs</p>
            </div>
        </div>
    </div>
</section>

<script src="https://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.2.min.js"><\/script>')</script>

<script src="js/vendor/bootstrap.min.js"></script>

<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<script src="/js/article.js"></script>

</body>
</html>